package com.yuanfengerp.SalesOrder.dao;

import com.yuanfengerp.SalesOrder.model.SalesOrder;
import com.yuanfengerp.basicInfoManage.customerInfo.model.Customerinfo;
import com.yuanfengerp.basicInfoManage.warehouseinfo.model.Warehouseinfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.List;

@Repository
@Mapper
public interface ISalesOrderDao {
    //查询仓库列表
    ArrayList<Warehouseinfo> getWarehouseList();
    //根据编号名称查询仓库信息
    Warehouseinfo getWarehouse(@Param("warehouse_ID") String warehouse_ID , @Param("warehouse_name") String warehouse_name);
    //查询客户列表
    ArrayList<Customerinfo> getCustomerList();
    //根据编号名称查询客户信息
    Customerinfo getCustomer(String customer_id , String customer_name);
    //查询订单列表
    ArrayList<SalesOrder> getSalesOrderList(@Param("pageSize") int pageSize, @Param("offset") int offset);
    //通过单据号，仓库名称，客户名称查询订单信息
    ArrayList<SalesOrder> getSalesOrder(@Param("prod_id") String prod_id, @Param("warehouse_ID") String warehouse_ID, @Param("customer_id") String customer_id);
    //添加订单
    int insertSalesOrder(SalesOrder salesOrder);
    //修改审核状态
    int updateSalesOrderStatus(@Param("status")int status);
    //批量删除订单
    int deleteSalesOrder(@Param("prod_id") List<String> prod_id);

}
